<template>
  <div class="app-container">
    <SplitPanel left-title="字典管理"
      :right-title="`${selectedItem.description ? '【' + selectedItem.description + '】' : ''}字典项管理`" :left-span="12"
      :right-span="12">
      <template #left>
        <DictIndex @row-click="handleRowClick" />
      </template>
      <template #right>
        <DetailIndex :dict-item="selectedItem" />
      </template>
    </SplitPanel>
  </div>
</template>

<script setup lang="ts">
import { DictVO } from '@/api/dict';

defineOptions({
  name: "DictPanel",
  inheritAttrs: false,
})

const selectedItem = ref<DictVO>({})

const handleRowClick = (row: any) => {
  selectedItem.value = { ...row }
}

</script>

<style scoped lang="scss"></style>
